package com.xbongbong.admin.model.impl;

import com.xbongbong.admin.domain.dao.FormInstallDao;
import com.xbongbong.admin.domain.entity.FormInstallEntity;
import com.xbongbong.admin.model.FormInstallModel;
import com.xbongbong.paas.toolbox.exception.XbbException;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @author guohui.zhang
 * @Title:
 * @Package
 * @Description:
 * @date 2020/3/1219:34
 */

@Service("formInstallModel")
public class FormInstallModelImpl implements FormInstallModel {

    @Resource
    private FormInstallDao formInstallDao;
    @Override
    public Integer insert(FormInstallEntity entity) throws XbbException {
        return formInstallDao.insert(entity);
    }

    @Override
    public Integer update(FormInstallEntity entity) throws XbbException {
        return formInstallDao.update(entity);
    }

    @Override
    public List<FormInstallEntity> findEntitys(Map<String, Object> param) {
        return formInstallDao.findEntitys(param);
    }

    @Override
    public List<FormInstallEntity> insertBatch(List<FormInstallEntity> list) {
        formInstallDao.insertBatch(list);
        return list;
    }

    @Override
    public Integer deleteByAppIdAndCorpid(String corpid, Long appId) {
        return formInstallDao.deleteByAppIdAndCorpid(corpid,appId);
    }

    @Override
    public Integer deleteByAppInstallId(String corpid, Long appInstallId) {
        return formInstallDao.deleteByAppInstallId(corpid, appInstallId);
    }

    @Override
    public Integer getEntitysCount(Map<String, Object> param) {
        return formInstallDao.getEntitysCount(param);
    }

    @Override
    public List findEntitysWithoutSub(Map<String, Object> param) {
        return null;
    }
}
